package com.sinochem.yunlian.ship.base.rest;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Map;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.github.pagehelper.Page;
import com.sinochem.yunlian.ship.base.biz.BsMessageSmsBiz;
import com.sinochem.yunlian.ship.base.entity.BsMessageSms;
import com.sinochem.yunlian.ship.base.vo.request.SmsFindVo;
import com.sinochem.yunlian.ship.common.annotation.IgnoreToken;
import com.sinochem.yunlian.ship.common.msg.RestResponse;
import com.sinochem.yunlian.ship.common.rest.BaseController;


@IgnoreToken
@RestController
@RequestMapping("sms")
public class BsMessageSmsController extends BaseController<BsMessageSmsBiz, BsMessageSms>{
	
	/**
	 * 运营管理- 短信列表
	 * @param vo
	 * @return
	 * @throws IllegalAccessException
	 * @throws IntrospectionException
	 * @throws InvocationTargetException
	 */
	@RequestMapping("/om/smsList")
    public RestResponse findSmsList(@RequestBody SmsFindVo vo) throws IllegalAccessException, IntrospectionException, InvocationTargetException {
		Map<String,Object> reMap = new HashMap<>();
		Page<BsMessageSms> data = super.baseBiz.findSmsList(vo);
		reMap.put("rows",data.getResult());
		reMap.put("total",data.getTotal());
		return RestResponse.success(reMap);
	}

}
